import java.util.Arrays;

/**
 * Created with Intellij IDEA.
 * Description;
 * User:墨琦
 * Data:2023-03-13
 * Time:16:57
 */
public class main1 {
    public static void printArray(int[] array)
    {
        for(int t:array)
        {
            System.out.println(t);
        }
    }
    public static  void transform(int[] array)
    {
        for(int t=0;t<array.length;t++)
        {
            array[t]=array[t]*2;
        }
    }
    public static  int sum(int[] array)
    {
        int num=0;
        for(int t:array)
        {
            num+=t;
        }
        return num;
    }
    public static  int avg(int[] array)
    {
        int num=0;
        for(int t:array)
        {
            num+=t;
        }
        return num/array.length;
    }
    public static void main(String[] args) {
        int[] array1=new int[100];
        int c=1;
        for(int t=0;t<array1.length;t++)
        {
            array1[t]=c++;
        }
        //printArray(array1);
        transform(array1);
        System.out.println(sum(array1));

        System.out.println(avg(array1));

        System.out.println(Arrays.toString(array1));
    }
}
